package org.example.data.form;

import lombok.Data;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

@Data
public class ProductForm {

    @NotNull(message = "产品ID不能为空", groups = {UpdateForm.class, GetForm.class})
    private Long id;

    @NotNull(message = "产品名称不能为空", groups = {AddForm.class})
    private String name;

    private Timestamp produceTimestamp;

    public static class GetForm{
    }

    public static class AddForm{
    }

    public static class UpdateForm{
    }

}
